/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: BusinessReport.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/29 下午3:15
 * LastModified: 2020/03/29 15:15:29
 */

package com.qolome.knowledge.design.pattern.visitor.demo.kpi;

import java.util.LinkedList;
import java.util.List;

/**
 * @author Qolome
 * @version V1.0
 * @Description 业务报表
 * @date 2020年 03月29日 15:15:45
 */
public class BusinessReport {

    private List<Employee> employees = new LinkedList<>();

    public BusinessReport(){
        employees.add(new Manager("刘经理"));
        employees.add(new Manager("张经理"));
        employees.add(new Manager("王经理"));
        employees.add(new Manager("陈经理"));
        employees.add(new Manager("李经理"));
        employees.add(new Developer("刘工"));
        employees.add(new Developer("张工"));
        employees.add(new Developer("王工"));
        employees.add(new Developer("陈工"));
        employees.add(new Developer("李工"));
    }

    public void showReport(IVisitor visitor){
        for (Employee employee: employees) {
            employee.accept(visitor);
        }
    }

}
